This invention is related to the field of use of image processing. More particularly, this invention is directed to a method and apparatus for motion estimation for digital video encoding.
Video image capture using a digital camera has become very prevalent. Video capture may be used for such applications as video concerning, video editing, and distributed video training. Many components of hardware and software need to work seamlessly to both get the video data (also referred to as a video xe2x80x9cstreamxe2x80x9d) from the hardware through the various layers of software on the personal computer (PC) and made visible on a display medium such as a monitor.
Motion estimation is performed in a variety of video encoding algorithms. For example, the moving pictures experts group (MPEG) standards for compression, decompression, processing, and coded representation of moving pictures, audio and their combination utilize motion estimation in their algorithms. See, Coding of Moving Pictures and Audio, International Organisation for Standardisation Organisation Internationale de Normalisation, ISO/IEC JTC1/SC29/WG11, June 1996.
Motion estimation is a pattern matching technique, and is extremely expensive for conventional computers to perform. Essentially, motion estimation involves comparing segments of one image frame against the previous image frame to determine if the new segment can be simply repeated at a new location rather than retransmitted. Image segments may be such sizes as 8 pixels by 8 pixels or 16 pixels by 16 pixels in size. For example, if an image is 640 pixels wide and 480 tall, it may be divided into 4,800 segments that are 8 square pixels in size if (i.e., 80 segments wide by 60 segments tall). At 30 images per second, there is a minimum of 144,000 segments per second on which to operate. Considering each pixel may be represented by many bits of information for color images (e.g., 1-bit for black and white image pixels, and 2 or more bits-typically 32-bits-for it color image pixels), billion of bits have to be processed per second.
Many current implementations require hardware compression in order to achieve xe2x80x9creal-timexe2x80x9d compression. That is because it takes more computational power to compress a video stream than it does to play it back. A significant part of the computation process involves motion estimation. Thus, it would be desirable to find a fast technique to compute motion estimation.
A method for determining motion estimation in a set of video frames including the comparing of a first macroblock from a video frame in the set of video frames to a second macroblock in a reference video frame to determine a differential value. Then, the differential value is compared to a comparison value. If the differential value is not smaller than the comparison value, then the differential value is compared to a minimal differential value. If the differential value is less than or equal to the minimal differential value, then the differential value is stored as the minimum differential value.